#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import json
import logging

import tornado.ioloop

from restrpc import restweb
from restrpc.rpc_worker import RPCWorker

amqp_url = 'amqp://admin:123456@172.16.1.156'


def main():
    logging.basicConfig(level=logging.DEBUG)
    logging.getLogger('pika').setLevel(logging.WARNING)

    app = restweb.make_app('ocr', amqp_url, debug=True)
    app.listen(9090, "0.0.0.0")
    tornado.ioloop.IOLoop.current().start()


if __name__ == '__main__':
    main()
    
